from django.conf.urls import url
from .views import RegisterView, UsernameCountView, MobileCountView

urlpatterns = [
    # 注册
    url(r"^register/$", RegisterView.as_view(), name="register"),
    # 用户名查询计数
    url(r'^usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/', UsernameCountView.as_view()),
    # 手机号查询计数
    url(r'^mobiles/(?P<mobile>1[3-9]\d{9})/count/', MobileCountView.as_view()),
]